<template>
  <div id="app">
    <router-view></router-view>
  </div>
</template>

<script>
export default {
  name: "app",
  updated() {},
  mounted() {
    this.islogin();
  },
  methods: {
    async islogin(){
       this.$http.get('/admin/islogin').then((res) => {
          if (res.data.data == '1') {
            this.$store.commit('clogin',true);
            this.$store.commit('cadmin',res.data.result);
            this.goto('/admin');
          } else {
            this.$store.commit('clogin',false);
          }
        })
     },
  }
};
</script>

<style lang="scss">

@import "./assets/animate.css";
@import "./assets/iconfont/css/font-awesome.min.css";
body,
input,
button,
textarea,
select,
option {
  font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
  padding: 0;
  margin: 0;
}
html,
body {
  width: 100%;
  color: #333;
  background-color: #f6f8f9;
}
#app {
  width: 100%;
  font-size: 14px;
}
.boxcard {
  padding: 16px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.15);
  width: 100%;
  display: flex;
}
.red {
  color: #ff0000;
}
.green {
  color: #67c23a;
}
/*定义滚动条高宽及背景 高宽分别对应横竖滚动条的尺寸*/
::-webkit-scrollbar
{
    width: 10px;
    height: 16px; 
    background-color: #fff;
}
 
/*定义滚动条轨道 内阴影+圆角*/
::-webkit-scrollbar-track
{
    -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
    border-radius: 10px;
    background-color: #fff;
}
 
/*定义滑块 内阴影+圆角*/
::-webkit-scrollbar-thumb
{
    border-radius: 10px;
    -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,.3);
    background-color: #ddd;
}
.nor-box{
  width: 86%;
  margin: auto;
  overflow: hidden;
  padding: 40px 0px;
  .nor-body{
    background: white;
    padding: 20px 40px;
    border-radius: 2px;
  }
  header{
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  }
}

</style>